﻿<%@ Page Title="" Language="C#" MasterPageFile="~/CANO.Master" AutoEventWireup="true"
	CodeBehind="UsersAdmin.aspx.cs" Inherits="CANO.WebSite.admin.UsersAdmin" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
	<script type="text/javascript">
		var fullName = function (value, metadata, record, rowIndex, colIndex, store) {
			return record.data.Apellido + ' ' + record.data.Nombre;
		};

	</script>
	<link href="../../../../resources/css/examples.css" rel="stylesheet" type="text/css" />
	<style type="text/css">
		.x-grid3-td-fullName .x-grid3-cell-inner
		{
			font-family: tahoma, verdana;
			display: block;
			font-weight: normal;
			font-style: normal;
			color: #385F95;
			white-space: normal;
		}
		
		.x-grid3-row-body p
		{
			margin: 5px 5px 10px 5px !important;
			width: 99%;
			color: Gray;
		}
	</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
	<form id="Form1" enctype="multipart/form-data" method="post" action="" class="fields"
	runat="server">
	<div class="box box-100 altbox">
		<div class="boxin">
			<div class="header">
				<h3>
					Usuarios</h3>
				<input id="btnVolver" runat="server" class="button" value="Volver" type="button" />
				<input id="btnNuevo" runat="server" class="button" value="Nuevo" type="button" />
				<input id="btnEditar" runat="server" class="button" value="Editar" type="button" />
				<input id="btnEliminar" runat="server" class="button" value="Eliminar" type="button" />
			</div>
			<div class="content">
				<div id="tabInformacionPrincipal">
						<asp:Panel ID="pnlError" runat="server" Visible="false">
							<div class="msg msg-error" style="margin:10px">
								<p>
									<asp:Label runat="server" ID="lblError"></asp:Label></p>
							</div>
						</asp:Panel>
						<ext:ResourceManager ID="ResourceManager1" runat="server" />
						<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="getAll"
							TypeName="CANO.Data.DAOs.UsuarioDAO" />
						<ext:GridPanel ID="GridPanel1" runat="server" Title="Usuarios Actuales" Frame="true" Height="600"
							AutoWidth="true" >
							<Store>
								<ext:Store ID="Store1" runat="server" DataSourceID="ObjectDataSource1">
									<Reader>
										<ext:JsonReader IDProperty="UsuarioID">
											<Fields>
												<ext:RecordField Name="UsuarioID" />
												<ext:RecordField Name="Nombre" />
												<ext:RecordField Name="Apellido" />
												<ext:RecordField Name="UserName" />
												<ext:RecordField Name="RolDesc" />
												<ext:RecordField Name="Mail" />
											</Fields>
										</ext:JsonReader>
									</Reader>
								</ext:Store>
							</Store>
							<ColumnModel ID="ColumnModel1" runat="server">
								<Columns>
									<ext:Column DataIndex="UsuarioID" Header="UserID" Hidden="true" />
									<ext:Column ColumnID="fullName" Header="Nombre y Apellido" Width="150" DataIndex="Nombre">
										<Renderer Fn="fullName" />
									</ext:Column>
									<ext:Column DataIndex="UserName" Header="Usuario" Width="150" />
									<ext:Column DataIndex="RolDesc" Header="Rol" Width="150" />
									<ext:Column DataIndex="Mail" Header="Correo Electronico" Width="300" />

								</Columns>
							</ColumnModel>
							<SelectionModel>
								<ext:RowSelectionModel ID="RowSelectionModel1" runat="server">
								</ext:RowSelectionModel>
							</SelectionModel>
						</ext:GridPanel>
				</div>
			</div>
			<!-- End content -->
		</div>
	</div>
	</form>
</asp:Content>
